package com.liyk.shop.controller;

import com.liyk.shop.response.Result;
import com.liyk.shop.service.impl.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: springcloud-demo
 * @description:
 * @author: lyk
 * @create: 2019-11-22 17:05
 **/
@RestController
@RequestMapping(value = "product")
public class ProductController {

    @Autowired
    private ProductService productService;

    /**
     * 商品列表
     */
    @GetMapping(value = "list")
    public Result getList(){
        return new Result(200,"port:8002",productService.getList());
    }

}
